﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="monitoroverview.aspx.cs"
    Inherits="Com.Rivyer.Web.monitor.monitoroverview" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>监控一览</title>
    <link href="../css/style.css" rel="stylesheet" type="text/css" />
    <link href="../css/rivcontent.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <%if (DesignMode)
      { %>
    <script type="text/javascript" src="../js/ASPxScriptIntelliSense.js"></script>
    <%} %>
    <script type="text/javascript">
        
    </script>
    <div>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td height="30">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td height="24" bgcolor="#353c44">
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td>
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td width="6%" height="19" valign="bottom">
                                                        <div align="center">
                                                            <img src="../images/tb.gif" width="14" height="14" /></div>
                                                    </td>
                                                    <td width="94%" valign="bottom">
                                                        <span class="STYLE1">监控一览</span>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td align="center" style="font-size: 12px; width=100%">
                    <div id="rivcontent">
                        <div class="title">
                            监控一览
                        </div>
                        <dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
                            KeyFieldName="id" Font-Size="12px" Width="800px" ClientInstanceName="monitoroverview"
                            OnRowInserting="ASPxGridView1_RowInserting" OnRowUpdating="ASPxGridView1_RowUpdating"
                            OnCustomCallback="ASPxGridView1_CustomCallback" 
                            onrowdeleting="ASPxGridView1_RowDeleting">
                            <Columns>
                                <dx:GridViewCommandColumn Caption="操作" ShowSelectCheckbox="True" VisibleIndex="0"
                                    Width="150px">
                                    <SelectButton Text="选择">
                                    </SelectButton>
                                    <EditButton Text="编辑" Visible="True">
                                    </EditButton>
                                    <NewButton Text="新增" Visible="True">
                                    </NewButton>
                                    <DeleteButton Text="删除" Visible="True">
                                    </DeleteButton>
                                    <CancelButton Text="取消">
                                    </CancelButton>
                                    <UpdateButton Text="更新">
                                    </UpdateButton>
                                    <ClearFilterButton Text="清除" Visible="True">
                                    </ClearFilterButton>
                                </dx:GridViewCommandColumn>
                                <dx:GridViewDataTextColumn FieldName="id" ReadOnly="True" Visible="False" VisibleIndex="1">
                                    <EditFormSettings Visible="False" />
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="单位" FieldName="department" VisibleIndex="2">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="地址" FieldName="address" VisibleIndex="3">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="ip" VisibleIndex="4">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataMemoColumn Caption="问题" FieldName="issue" VisibleIndex="5">
                                    <PropertiesMemoEdit Rows="4">
                                    </PropertiesMemoEdit>
                                </dx:GridViewDataMemoColumn>
                                <dx:GridViewDataSpinEditColumn Caption="数量" FieldName="num" VisibleIndex="6" Width="45px">
                                    <PropertiesSpinEdit DisplayFormatString="g">
                                    </PropertiesSpinEdit>
                                </dx:GridViewDataSpinEditColumn>
                                <dx:GridViewDataMemoColumn Caption="备注" FieldName="description" VisibleIndex="7">
                                    <PropertiesMemoEdit Rows="4">
                                    </PropertiesMemoEdit>
                                </dx:GridViewDataMemoColumn>
                            </Columns>
                            <SettingsBehavior ConfirmDelete="True" />
                            <SettingsPager PageSize="13">
                            </SettingsPager>
                            <SettingsEditing EditFormColumnCount="1" Mode="PopupEditForm" PopupEditFormHeight="300px"
                                PopupEditFormHorizontalAlign="Center" PopupEditFormWidth="400px" />
                            <Settings ShowFilterRow="True" ShowFilterRowMenu="True" ShowGroupPanel="True" />
                        </dx:ASPxGridView>
                        <table border="0" cellpadding="10px" cellspacing="0" style="font-size: 12px">
                            <tr>
                                <td>
                                    <dx:ASPxButton ID="ASPxButton1" runat="server" Text="全选" AutoPostBack="false">
                                        <ClientSideEvents Click="function(s, e) {
	monitoroverview.SelectAllRowsOnPage();
}" />
                                    </dx:ASPxButton>
                                </td>
                                <td>
                                    <dx:ASPxButton ID="ASPxButton2" runat="server" Text="取消选中" AutoPostBack="false">
                                        <ClientSideEvents Click="function(s, e) {
	monitoroverview.UnselectAllRowsOnPage();
}" />
                                    </dx:ASPxButton>
                                </td>
                                <td>
                                    <dx:ASPxButton ID="ASPxButton3" runat="server" Text="加入ping名单" 
                                        onclick="ASPxButton3_Click">
                                    </dx:ASPxButton>
                                </td>
                                <td>
                                    <dx:ASPxButton ID="ASPxButton5" runat="server" Text="查看监控" OnClick="ASPxButton5_Click">
                                    </dx:ASPxButton>
                                </td>
                                <td>
                                    <dx:ASPxButton ID="ASPxButton4" runat="server" Text="所有监控加入ping名单" 
                                        onclick="ASPxButton4_Click">
                                    </dx:ASPxButton>
                                </td>
                                <td>
                                    <a href="./tmppinglist.aspx">转到ping名单界面</a>
                                </td>
                            </tr>
                        </table>
                        <span class="tips">Tips:</span>1.单位数量增加或更新时数据必须填写;
                    </div>
                </td>
            </tr>
        </table>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ITConnectionString %>"
        DeleteCommand="DELETE FROM [tb_monitor] WHERE [id] = @id" InsertCommand="INSERT INTO [tb_monitor] ([department], [address], [ip], [issue], [num], [description]) VALUES (@department, @address, @ip, @issue, @num, @description)"
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM [tb_monitor]"
        UpdateCommand="UPDATE [tb_monitor] SET [department] = @department, [address] = @address, [ip] = @ip, [issue] = @issue, [num] = @num, [description] = @description WHERE [id] = @id">
        <DeleteParameters>
            <asp:Parameter Name="id" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="department" Type="String" />
            <asp:Parameter Name="address" Type="String" />
            <asp:Parameter Name="ip" Type="String" />
            <asp:Parameter Name="issue" Type="String" />
            <asp:Parameter Name="num" Type="Int32" />
            <asp:Parameter Name="description" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="department" Type="String" />
            <asp:Parameter Name="address" Type="String" />
            <asp:Parameter Name="ip" Type="String" />
            <asp:Parameter Name="issue" Type="String" />
            <asp:Parameter Name="num" Type="Int32" />
            <asp:Parameter Name="description" Type="String" />
            <asp:Parameter Name="id" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
    </form>
</body>
</html>
